PWD := $(shell pwd)
obj-m += a2.o
CROSS_COMPILE=aarch64-linux-gnu-
KERNEL=/home/h/tb/kernel/kernel-tinker_board_2-debian_10-2.0.0

all:
	make ARCH=arm64 CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(PWD) modules
clean:
	make -C $(KERNEL) SUBDIRS=$(PWD) clean
	
scp:
	scp  a2.ko   linaro@192.168.31.82:/home/linaro/a

t:
	scp test2.c linaro@192.168.31.82:/home/linaro/a
	
c:	
	ssh linaro@192.168.31.82  "cd a; gcc -o  test /home/linaro/a/test2.c -lpthread;sudo ./test"
